<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8"/>
    <title>Title</title>
    <!-- Required meta tags -->
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
    <title>Purple Admin</title>
    <!-- plugins:css -->
    <link rel="stylesheet" href="../../vendors/iconfonts/mdi/css/materialdesignicons.min.css"/>
    <link rel="stylesheet" href="../../vendors/css/vendor.bundle.base.css"/>
    <!-- endinject -->
    <!-- plugin css for this page -->
    <link rel="stylesheet" href="../../node_modules/jqvmap/dist/jqvmap.min.css"/>
    <!-- End plugin css for this page -->
    <!-- inject:css -->
    <link rel="stylesheet" href="../../css/style.css"/>
    <!-- endinject -->
    <link rel="shortcut icon" href="../../images/favicon.png"/>


</head>
<body>
<div class="col-lg-12 stretch-card">
    <div class="card">
        <div class="card-body">
            <h4 class="card-title">
                <button type="button" class="btn btn-gradient-primary btn-rounded btn-icon">
                    <i class="mdi mdi-home-outline"></i>
                </button>
                <font style="vertical-align: inherit;"><font
                        style="vertical-align: inherit;">首页/财务管理/银行账户管理</font></font></h4>
            <span class="card-description"><font style="vertical-align: inherit;"><font
                    style="vertical-align: inherit;">
                    数据列表 </font></font>
                  </span>
            <div style="position:relative;left:78%;">
                <button type="button" class="btn btn-gradient-success"><font style="vertical-align: inherit;"><font
                        style="vertical-align: inherit;">添加</font></font></button>
                <!-- <button type="button" class="btn btn-gradient-light"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">打印</font></font></button> -->
                <button type="button" class="btn btn-gradient-light"><font style="vertical-align: inherit;"><font
                        style="vertical-align: inherit;">导出</font></font></button>
            </div>

            <table class="table table-bordered">
                <thead>
                <tr>
                    <th>账号</th>
                    <th>账户名称</th>
                    <th>开户银行</th>
                    <th>开户行</th>
                    <th>币种</th>
                    <th>账户类型</th>
                    <th>收入</th>
                    <th>支出</th>
                    <th>更新日期</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="yy:${qryAllList}">
                    <td th:text="${yy.yNum}"></td>
                    <td th:text="${yy.title}"></td>
                    <td th:text="${yy.depositBank}"></td>
                    <td th:text="${yy.openBank}"></td>
                    <td th:text="${yy.currency}"></td>
                    <td th:text="${yy.type}"></td>
                    <td th:text="${yy.app.alLoanMoney}"></td>
                    <td>0.00</td>
                    <td th:text="${yy.app.alTime}"></td>
                    <td th:text="${yy.status}"></td>
                    <td>
                        <a href="javascript:;" th:onclick="'del(this)'" th:attr="yId=${yy.yId }">删除</a>
                    </td>
                </tr>
                </tbody>
            </table>

            <script type="text/javascript" th:src="@{/js/jquery-1.8.3.min.js}"></script>
            <script type="text/javascript" th:src="@{/layer/layer.js}"></script>
            <script type="text/javascript" th:src="@{/js/time.js}"></script>
            <script type="text/javascript">
                //删除用户
                function del(ele) {
                    var $ele = $(ele);
                    var yId = $ele.attr('yId');
                    // alert(yId);
                    $.ajax({
                        url: '/ysy/delacc/' + yId + "",
                        type: 'get',
                        data: '',
                        dataType: 'json',
                        success: function (data) {//{'success':xx,'msg':'xxxx'}
                            if (data.success) {
                                alert("成功");
                                //页面删除行
                                $("#Conframe").load("/ysy/account?currentPageNo=1");
                            } else {
                                alert("失败");

                            }
                        }
                    });
                }
            </script>
        </div>
    </div>
</div>
</body>
</html>